package com.xbongbong.pro.enums.errorcodes;

import com.xbongbong.i18n.util.I18nMessageUtil;

/**
 * @author: yingjf
 * @date: 2023/3/8 16:48
 * @description: wps在线编辑相关错误枚举
 */
public enum OnlineEditorErrorCodeEnum implements ErrorCode  {

    APT_ERROR_340001(340001,"enum.errorCode.msg.api_error_340001"),
    APT_ERROR_340002(340002,"enum.errorCode.msg.api_error_340002"),
    APT_ERROR_340003(340003,"enum.errorCode.msg.api_error_340003"),
    APT_ERROR_340004(340004,"enum.errorCode.msg.api_error_340004"),
    APT_ERROR_340005(340005,"enum.errorCode.msg.api_error_340005"),
    APT_ERROR_340006(340006,"enum.errorCode.msg.api_error_340006"),
    APT_ERROR_340007(340007,"enum.errorCode.msg.api_error_340007"),


    ;
    /**
     * 错误类型
     * @see ErrorCodeTypeEnum
     */
//    private final String type;
    /**
     * 错误码
     */
    private final int code;
    /**
     * 错误描述
     */
    private final String msg;

    OnlineEditorErrorCodeEnum(int code, String msg) {
        this.code = code;
        this.msg = msg;
    }

    @Override
    public int getCode() {
        return code;
    }

    @Override
    public String getMsg() {
        return I18nMessageUtil.getMessage(msg);
    }
}
